package com.lelouch.concurrency.example.immutable;

import com.google.common.collect.ImmutableList;
import com.google.common.collect.ImmutableMap;
import com.lelouch.concurrency.annotation.ThreadSafe;
import lombok.extern.slf4j.Slf4j;


/**
 * 不可变类3
 *
 *
 * @author lcy
 * @create 2018-05-23 16:01
 */
@Slf4j
@ThreadSafe
public class ImmutableExample3 {


    private static ImmutableList<Integer> list = ImmutableList.of(1,2,3,4);
    private static ImmutableMap<Integer,Integer> map = ImmutableMap.<Integer,Integer>builder().put(1,2).put(3,4).build();





    public static void main(String[] args) {
       //list.add(5);
        map.put(1,2);
    }
}
